import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class TestDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println("奇数位:");
        for (int i = 31; i >= 1; i-=2) {
            System.out.print(n >>i &1);
        }
        System.out.println();
        System.out.println("偶数位:");
        for (int j = 30; j >= 0 ; j-=2) {
            System.out.print(n >>j &1);
        }
    }
}
